package me.zzp.configuration;

import me.zzp.resolver.JsonResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.List;

/**
 * @author zhangzepeng
 */
@Configuration
public class JsonConfiguration extends WebMvcConfigurerAdapter {

    @Autowired
    private JsonResolver jsonResolver;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(jsonResolver);
    }
}
